package sigletondemo;

public class Principal {

    private static Principal principal;

    private String name;


    private Principal() {
        this.name = "王校长";
    }


    public static Principal getPrincipal() {
        if(principal == null) {
            principal = new Principal();
        }
        return principal;
    }

    // 校长的一些方法
    public void announcement(String message) {
        System.out.println(name + "通知：" + message);
    }

    public void approveDocument(String file) {
        System.out.println(name + "审批通过：" + file);
    }

}
